package com.molichuxing.services.infrastructure.service;

import com.molichuxing.framework.dto.Paged;
import com.molichuxing.services.infrastructure.dto.request.create.MessageCenterCreateDto;
import com.molichuxing.services.infrastructure.dto.response.MessageCenterDto;

import java.util.Map;

/**
 * @Author: renzhengyu
 * @Description: 消息中心service
 * @Date: Created in 10:35 2019/10/10
 * @Modified By:
 **/
public interface MessageCenterService {

    /**
     * 创建消息
     * @param messageCenterCreateDto
     * @return
     */
    int createMessageCenter(MessageCenterCreateDto messageCenterCreateDto);

    /**
     * 消息列表
     * @param map
     * @param pageNum
     * @param pageSize
     * @return
     */
    Paged<MessageCenterDto> getMessageCenterPage(Map<String, Object> map, Integer pageNum, Integer pageSize);

    /**
     * 查询用户未读消息数量
     * @param userId
     * @return
     */
    Integer getUnreadCount(Integer userId);

    /**
     * 将用户所有消息改为已读
     * @param userId
     * @return
     */
    int modifyStatusByUserId(Integer userId);
}
